#include "StdAfx.h"
#include "BankSpecialLimitModel.h"


CBankSpecialLimitModel::CBankSpecialLimitModel(void)
{
	m_id = 0;
	m_professionType = 0;
	m_yfMaxLoan = 0;
	m_wfMaxLoan = 0;
	m_maxLiabilities = 0;
}

CBankSpecialLimitModel::~CBankSpecialLimitModel(void)
{
}

void CBankSpecialLimitModel::parseFromJson(Json::Value& jsonData)
{
	if (!jsonData["id"].isNull()) 
	{
		this->m_id = jsonData["id"].asInt();
	}
	CUtils::getJsonStringField(jsonData, "bankName", m_bankName);
	CUtils::getJsonStringField(jsonData, "property", m_property);
	if (!jsonData["professionType"].isNull()) 
	{
		this->m_professionType = jsonData["professionType"].asInt();
	}
	if (!jsonData["yfMaxLoan"].isNull()) 
	{
		this->m_yfMaxLoan = jsonData["yfMaxLoan"].asInt();
	}
	if (!jsonData["wfMaxLoan"].isNull()) 
	{
		this->m_wfMaxLoan = jsonData["wfMaxLoan"].asInt();
	}
	if (!jsonData["maxLiabilities"].isNull()) 
	{
		this->m_maxLiabilities = jsonData["maxLiabilities"].asInt();
	}
}



